//
//  AlertOK.m
//  CNR
//
//  Created by Alimjan on 15/2/11.
//  Copyright (c) 2015年 Alimjan. All rights reserved.
//

#import "AlertOK.h"

@implementation AlertOK

-(void)awakeFromNib{
    self.layer.masksToBounds = YES;
    self.layer.cornerRadius = 5;
    
}
-(void)showAndDismissAfter:(int)time{
    [super show];
    [self performSelector:@selector(onTimeUp) withObject:nil afterDelay:time];
}
-(void)onTimeUp{
    [self dismissAlert];
    if (_block) {
        _block();
    }
}
@end
